import request from '../utils/request'
// 获取用户频道
export const getUserChannels = () => {
  return request({
    url: '/v1_0/user/channels'
  })
}

// 获取所有频道
export const getAllChannels = () => {
  return request({
    url: '/v1_0/channels'
  })
}

// 添加用户频道
export const addChannels = (channel) => {
  return request({
    url: '/v1_0/user/channels',
    method: 'patch',
    data: {
      channels: [channel]
    }
  })
}

// 删除用户频道
export const delChannels = (target) => {
  return request({
    url: `/v1_0/user/channels/${target}`,
    method: 'delete'
  })
}
